home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / feedaemon / fd110rc5.exe / {app} / Data / defaults / styles / Nightfall.fdxsl < prev    next >
Extensible Markup Language  |  2004-05-24  |  7KB  |  173 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6. <xsl:output method="html"/>
  7.  
  8. <xsl:variable name="common-styles">
  9.     <style type="text/css">
  10.         html { border: 6px solid gray; }
  11.         body { background-color: black; color: #F2F2F2; font: 92% Tahoma, Arial, sans-serif; margin: 12px 22px; }
  12.         a { color: #51AAFF; }
  13.         a:hover { color: #6B8ADE; text-decoration: underline; }
  14.         span.nodescription {    color: #E4E4E4; font-size: smaller; }
  15.  
  16.         div.newspapertitle { font-weight: bold; padding-bottom: 12px; text-transform: uppercase; }
  17.         div.channel, div.favchannel { border-bottom: 1px solid silver; margin-top: 14px}
  18.         div.channeltitle { font-weight: bold; text-transform: uppercase; margin-top: 12px; margin-bottom: 18px;}
  19.         img.channel { border: none; }
  20.  
  21.         div.newsitemcontent { line-height: 140%; }
  22.         div.newsitemcontent ol, div.newsitemcontent ul { list-style-position: inside;}        
  23.         div.newsitemtitle { font-weight: bold; margin-bottom: 8px }
  24.         div.newsitemfooter { color: silver; font-size: x-small; text-align: left; margin-top: 6px; margin-bottom: 18px; }
  25.  
  26.         div.newsitemtitle a, div.newsitemcontent a, div.newsitemfooter a { text-decoration: none; }
  27.     </style>
  28. </xsl:variable>
  29.  
  30. <!-- channel group newspaper -->
  31. <xsl:template match="newspaper[@type='group']">
  32.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  33.     <head>
  34.         <title>Group Newspaper</title>
  35.         <xsl:copy-of select="$common-styles"/>
  36.     </head>
  37.     <body>
  38.         <div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>        
  39.         
  40.         <!-- loop through each channel -->
  41.         <xsl:for-each select="channel">
  42.             <xsl:variable name="chanlink" select="link"/>
  43.             <xsl:variable name="chantitle"/>
  44.         
  45.             <!-- determine the class based on whether this is the 'favorite' channel -->
  46.             <div>
  47.                 <xsl:attribute name="class">
  48.                     <xsl:choose>
  49.                         <xsl:when test="@favorite">
  50.                             <xsl:text>favchannel</xsl:text>
  51.                          </xsl:when>
  52.                          <xsl:otherwise>
  53.                             <xsl:text>channel</xsl:text>
  54.                         </xsl:otherwise>
  55.                     </xsl:choose>
  56.                 </xsl:attribute>
  57.                 
  58.                 <div class="channeltitle">
  59.                     <!-- channel image -->
  60.                     <xsl:if test="image">
  61.                       <xsl:variable name="imgurl" select="image/url"/>
  62.                       <xsl:variable name="imgtitle" select="image/title"/>
  63.                       <xsl:variable name="imglink" select="image/link"/>
  64.                       <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}" align="right" style="margin-left: 8px"/></a>
  65.                     </xsl:if>
  66.                     <!-- channel title -->
  67.                     <a href="{$chanlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  68.                 </div>
  69.                 
  70.                 <!-- loop through each news item -->
  71.                 <xsl:for-each select="item">
  72.                     <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  73.                    <div class="newsitemtitle">
  74.                       <xsl:variable name="itemlink" select="link"/>
  75.                        <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  76.                     </div>
  77.                     <div class="newsitemcontent">
  78.                         <xsl:value-of select="description" disable-output-escaping="yes"/>
  79.                     </div>
  80.                     <div class="newsitemfooter"><xsl:value-of select="fd:dateDisplay"/></div>
  81.                   </xsl:for-each>
  82.             </div> <!-- close the channel div -->
  83.         </xsl:for-each>
  84.     </body>
  85.     </html>    
  86. </xsl:template>
  87.  
  88. <!-- channel newspaper -->
  89. <xsl:template match="newspaper[@type='channel']">
  90.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  91.     <head>
  92.         <title>Channel Newspaper</title>
  93.         <xsl:copy-of select="$common-styles"/>
  94.     </head>
  95.     <body>
  96.         <div class="newspapertitle">
  97.             <!-- channel title -->        
  98.             <xsl:value-of select="title" disable-output-escaping="yes"/>
  99.             <!-- channel image -->
  100.             <xsl:if test="channel/image">
  101.               <xsl:variable name="imgurl" select="channel/image/url"/>
  102.               <xsl:variable name="imgtitle" select="channel/image/title"/>
  103.               <xsl:variable name="imglink" select="channel/image/link"/>
  104.               <br/>
  105.               <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}" align="bottom" style="margin-top: 8px;"/></a>
  106.             </xsl:if>
  107.         </div>
  108.         
  109.         <!-- loop through each news item -->
  110.         <xsl:for-each select="channel/item">
  111.             <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  112.            <div class="newsitemtitle">
  113.               <xsl:variable name="itemlink" select="link"/>
  114.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  115.             </div>
  116.             <div class="newsitemcontent">
  117.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  118.             </div>
  119.             <div class="newsitemfooter">
  120.                 <xsl:value-of select="fd:dateDisplay"/>
  121.             </div>
  122.           </xsl:for-each>
  123.         
  124.     </body>
  125.     </html>
  126. </xsl:template>
  127.  
  128. <!-- single news item -->
  129. <xsl:template match="newspaper[@type='newsitem']">
  130.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  131.     <head>
  132.         <title>News Item</title>
  133.         <xsl:copy-of select="$common-styles"/>
  134.     </head>
  135.     <body>
  136.         <xsl:for-each select="channel/item">        
  137.            <div class="newsitemtitle">
  138.               <xsl:variable name="itemlink" select="link"/>
  139.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  140.             </div>
  141.             <div class="newsitemcontent">
  142.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  143.             </div>
  144.             <div class="newsitemfooter">
  145.                 <!-- 
  146.                 Important: use 'source' element here so that source channel shows for 
  147.                 newsbins and watches.  For other channels, FeedDemon sets the source
  148.                 to the channel itself.
  149.                 -->
  150.                 <xsl:variable name="srclink" select="source/@htmlUrl"/>
  151.                 <a href="{$srclink}"><xsl:value-of select="source"/></a>
  152.                 <!-- add link to comments if available -->
  153.                 <xsl:if test="comments">
  154.                     <xsl:variable name="commentlink" select="comments"/>
  155.                     <xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
  156.                     <a href="{$commentlink}"><img src="{$commentimg}" border="0" hspace="6"/></a>
  157.                 </xsl:if>
  158.                 <!-- add link to enclosure if available -->
  159.                 <xsl:if test="enclosure">
  160.                     <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  161.                     <xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
  162.                     <a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" hspace="6"/></a>
  163.                 </xsl:if>
  164.                 <br />
  165.                 <xsl:value-of select="fd:dateDisplay"/>
  166.             </div>
  167.           </xsl:for-each>
  168.         
  169.     </body>
  170.     </html>
  171. </xsl:template>
  172.  
  173. </xsl:stylesheet>